﻿/// <reference path="_namespace.js" />
/// <reference path="../../math/Vector3.js"/>

/*****************************************************************************
Ajaxna library class definition.
Author: krobinson 11/5/2008 1:38:32 AM.
Class:  ajax.xna.framework.BoundingSphere
*****************************************************************************/

$addNamespace("ajax.xna.framework");
$imports("ajax.math.Vector3");
//-----------------------------------------------------------------------------

ajax.xna.framework.BoundingSphere = function(center, radius)
{
    this.center = center;
    this.radius = radius;
}
$extend("ajax.xna.framework.BoundingSphere", "");

//-----------------------------------------------------------------------------

// Public members
//-----------------------------------------------------------------------------
ajax.xna.framework.BoundingSphere.prototype.center = ajax.math.Vector3.prototype;
ajax.xna.framework.BoundingSphere.prototype.radius = 0.0;

// Public Methods
//-----------------------------------------------------------------------------


/* Not Imlpemented
public bool Equals(BoundingSphere other);
public override bool Equals(object obj);
public override int GetHashCode();
public override string ToString();
public static BoundingSphere CreateMerged(BoundingSphere original, BoundingSphere additional);
public static void CreateMerged(ref BoundingSphere original, ref BoundingSphere additional, out BoundingSphere result);
public static BoundingSphere CreateFromBoundingBox(BoundingBox box);
public static void CreateFromBoundingBox(ref BoundingBox box, out BoundingSphere result);
public static BoundingSphere CreateFromPoints(IEnumerable<Vector3> points);
public static BoundingSphere CreateFromFrustum(BoundingFrustum frustum);
public bool Intersects(BoundingBox box);
public void Intersects(ref BoundingBox box, out bool result);
public bool Intersects(BoundingFrustum frustum);
public PlaneIntersectionType Intersects(Plane plane);
public void Intersects(ref Plane plane, out PlaneIntersectionType result);
public float? Intersects(Ray ray);
public void Intersects(ref Ray ray, out float? result);
public bool Intersects(BoundingSphere sphere);
public void Intersects(ref BoundingSphere sphere, out bool result);
public ContainmentType Contains(BoundingBox box);
public void Contains(ref BoundingBox box, out ContainmentType result);
public ContainmentType Contains(BoundingFrustum frustum);
public ContainmentType Contains(Vector3 point);
public void Contains(ref Vector3 point, out ContainmentType result);
public ContainmentType Contains(BoundingSphere sphere);
public void Contains(ref BoundingSphere sphere, out ContainmentType result);
internal void SupportMapping(ref Vector3 v, out Vector3 result);
public BoundingSphere Transform(Matrix matrix);
public void Transform(ref Matrix matrix, out BoundingSphere result);
public static bool operator ==(BoundingSphere a, BoundingSphere b);
public static bool operator !=(BoundingSphere a, BoundingSphere b);
*/

// Statics
//-----------------------------------------------------------------------------
ajax.xna.framework.BoundingSphere.cast = function(obj)
{///<returns type="ajax.xna.framework.BoundingSphere"/>
    return obj;
}